Skip to content

docs: clone to a short path on Windows to avoid MAX_PATH build failures (#678)#684

Merged
azchohfi merged 1 commit into
mainfrom
azchohfi-fix-perf-bench-arm64-xaml-build
Jun 30, 2026
Merged

docs: clone to a short path on Windows to avoid MAX_PATH build failures (#678)#684
azchohfi merged 1 commit into
mainfrom
azchohfi-fix-perf-bench-arm64-xaml-build

Conversation

@azchohfi

@azchohfi azchohfi commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Documents that the repo should be cloned to a short path on Windows to avoid MAX_PATH build failures. Docs-only — no build-configuration or source changes (README.md + CONTRIBUTING.md, +22 lines).

Background (issue #678)

On Windows, the Windows App SDK's XAML markup compiler (XamlCompiler.exe) and resource indexer (MakePri.exe) are 32-bit tools with no long-path support. When the repository is cloned to a long path (a deeply nested or OneDrive-synced folder), a project's generated obj/bin output paths can exceed the Windows 260-character MAX_PATH limit and the build fails — e.g. MSB3073 (XAML markup compile) or PRI210/APPX0002 (resource indexer). This is most visible on ARM64 dev boxes, where those tools run under x86 emulation, and it reproduces on a pristine main checkout (pre-existing; not a regression). It does not affect x64 CI or the /perf gate, which build from short paths.

What changed

  • README.md (Quick start) — a short ⚠️ callout at the git clone step.
  • CONTRIBUTING.md (Prerequisites) — a fuller note with the error signatures and a core.longpaths clarification (it lets Git check out long paths, but the WinUI App SDK build tools still require the short checkout path).

Why docs instead of a build-config change

An earlier revision of this PR redirected each project's obj/bin to a short %LOCALAPPDATA% path on ARM64 hosts. Per maintainer preference that approach was dropped in favor of this documentation note: the failure is a dev-box ergonomics issue (clone location) rather than a product/CI defect, and cloning to a short path avoids it entirely without adding build machinery.

Validation

Docs-only; no build impact. The guidance is verified empirically — relocating an affected checkout to a short root (e.g. C:\src\) makes the same toolchain build successfully on this ARM64 box.

Closes #678.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses ARM64 Windows dev-box build failures for the tests/perf_bench/** WinUI benchmark apps by conditionally skipping their builds when the host OS architecture is ARM64, while keeping x64/CI behavior unchanged.

Changes:

  • Added a tests/perf_bench/Directory.Build.targets that re-imports the repo-root targets (preserving root AOT/trim settings) and computes a host-arch gate (PerfBenchHostArchitecture + PerfBenchSkipWinUiAppOnArm64).
  • Added a conditionally imported targets file that replaces the WinUI app Build target with a no-op (emitting a high-importance message), so leaf perf_bench WinUI executables are skipped on ARM64 hosts while PerfBench.Shared still builds.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/perf_bench/Directory.Build.targets Re-imports root targets and defines an ARM64-host gating property; conditionally imports the skip targets only for WinUI WinExe projects.
tests/perf_bench/build/SkipWinUiAppBuild.Arm64.targets Provides a no-op Build target (with an explanatory message) for gated WinUI app projects on ARM64 hosts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@azchohfi azchohfi changed the title Fix #678: skip perf_bench WinUI app builds on ARM64 dev-box hosts Fix #678: build WinUI apps on ARM64 dev boxes by shortening long obj/bin output paths Jun 26, 2026
@azchohfi azchohfi requested a review from Copilot June 26, 2026 02:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread Directory.Build.props Outdated
Comment thread Directory.Build.props Outdated
azchohfi pushed a commit that referenced this pull request Jun 26, 2026
Address Copilot review on #684:

- Make the src\ exclusion case-insensitive (OrdinalIgnoreCase) so a drive-letter casing mismatch between MSBuildThisFileDirectory and MSBuildProjectFullPath can never cause the shipping library under src\ to be redirected.

- Quote the StableStringHash() path argument so a project directory containing parentheses or commas (e.g. 'Program Files (x86)') cannot break MSBuild's property-function parser.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azchohfi azchohfi requested a review from Copilot June 26, 2026 02:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread Directory.Build.props Outdated
azchohfi pushed a commit that referenced this pull request Jun 26, 2026
Address Copilot review on #684: explain that 145 is an empirically chosen cutoff (MAX_PATH 260 minus the ~100-115 char obj/bin output subtree the SDK/WinUI toolchain appends below the project dir), so future edits don't accidentally invalidate the gate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azchohfi azchohfi requested a review from Copilot June 26, 2026 02:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread Directory.Build.props Outdated
azchohfi pushed a commit that referenced this pull request Jun 26, 2026
Address Copilot review on #684: the gate keyed only off OSArchitecture, so it could activate on non-Windows Arm64 hosts (macOS/Linux) where LOCALAPPDATA is unset, yielding a malformed BaseOutputPath. The failing tools (XamlCompiler/MakePri) are Windows-only, so require OS == Windows_NT and a non-empty LOCALAPPDATA. Inert on non-Windows by construction.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azchohfi azchohfi requested a review from Copilot June 26, 2026 02:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Long checkout paths (e.g. deeply nested or OneDrive-synced folders) push a project's generated obj/bin output past the Windows 260-char MAX_PATH limit, which the Windows App SDK's 32-bit XAML/resource compilers cannot handle (MSB3073 / PRI210 / APPX0002) -- most visibly on ARM64 dev boxes where those tools run under emulation. Document the short-path recommendation in README Quick start and CONTRIBUTING Prerequisites.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azchohfi azchohfi force-pushed the azchohfi-fix-perf-bench-arm64-xaml-build branch from d2f67c3 to 8752c91 Compare June 30, 2026 19:11
@azchohfi azchohfi changed the title Fix #678: build WinUI apps on ARM64 dev boxes by shortening long obj/bin output paths docs: clone to a short path on Windows to avoid MAX_PATH build failures (#678) Jun 30, 2026
@azchohfi azchohfi requested a review from Copilot June 30, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@azchohfi azchohfi marked this pull request as ready for review June 30, 2026 20:16
@azchohfi azchohfi merged commit 926f5db into main Jun 30, 2026
20 checks passed
@azchohfi azchohfi deleted the azchohfi-fix-perf-bench-arm64-xaml-build branch June 30, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build: perf_bench XAML projects fail on ARM64 — XamlCompiler.exe exits with code 1 (MSB3073)

2 participants